<?php
if (isset($_POST["submit"])) {
    $name = $_POST["name"];
    $email = $_POST["email"];
    $contents = $_POST["contents"];
    $date = date('Y-m-d');
    ContactsInsert($name, $email, $contents, $date);
    header('location:index.php?p=submit');
}
?>
<div id="header">
	<?php
	require './pages/blocks/menu.php';
	?>
</div>
<div id="post">
	<div id="post-content">
		<div class="content">
			<h2 class="post-content-header">Gửi liên hệ</h2>
			<div class="main-content">
				<form class="contact-form" name="" action="" method="post">
					<p>
						Tên của bạn:
						<br />
						<input name="name" type="text" class="input-text" />
						<br />
					</p>
					<p>
						Email:
						<br />
						<input name="email" type="email" class="input-text" />
						<br />
					</p>
					<p>
						Nội dung:
						<br />
						<textarea name="contents" rows="8" cols="80" ></textarea>
					</p>
					<p>
						<input name="submit" type="submit" value="Gửi" class="button" />
					</p>
				</form>
			</div>
			<h2 class="post-content-header">Liên Hệ Trực Tiếp</h2>
			<div class="main-content">
				<?php
				require './pages/information/information.php';
				?>
			</div>
		</div>
	</div>

	<div id="widget">
		<?php
		require './pages/blocks/widget.php';
		?>
	</div>

	<div class="clear"></div>

</div>

<div id="footer">
	<?php
	require './pages/blocks/footer.php';
	?>
</div>

<script>
    var name=$('')
</script>